package com.aaa.day01.test;

/**
 * @author ：Teacher陈（86521760@qq.com）
 * @date ：Created in 2024/11/12 10:31
 * @description：我的方法类
 * @modified By：
 * @version: 21.0
 */
public class MyFunction {

    /**
     * @create by: Teacher陈
     * @description:
     * @create time: 2024/11/12 10:40
     * @param a
     * @param b
     * @return void
     */
  /*  public static void add(int  a, int b){

        a += 1;
        b += 2;
    }*/
    public static void add(Integer  a, Integer b){

        a += 1;
        b += 2;
    }
    public static void addAge(Person person){

        person.age+=1;
    }

    public void show(char c, int a){
        System.out.println(1);
    }
    public void show(int a, char c){
        System.out.println(2);
    }
    public void show(int a, char c, double d){
        System.out.println(3);
    }
    public void show(String str, int a){
        System.out.println(4);
    }
    public void shows(char c, int a){
        System.out.println(5);
    }//不构成方法重载

/*   public void show(int a,String ...names){
        System.out.println(6);
        System.out.println(a);
       for (int i = 0; i < names.length; i++) {

       }
        for (String name : names) {
            System.out.println(name);
        }
    }*/
    public void show(int a,String[] names){
        System.out.println(6);
        System.out.println(a);
        for (String name : names) {
            System.out.println(name);
        }
    }
    public static void main(String[] args) {
       /* Test.print();*/
       /* Test test = new Test();
        test.doPrint();*/
        Integer a = 10;
        Integer b = 20;
        add(a, b);
        System.out.println("a=" + a + " b=" + b);
      /*  Person person= new Person();
        person.age=10;
        addAge(person);
        System.out.println(person.age);*/
       /* MyFunction myFunction = new MyFunction();
        //myFunction.show(23,'a',34);
        String[] arrays={};
        myFunction.show(23,arrays);*/
    }
}
